:root {
    --sidebar-bg: #f8f9fa;
    --sidebar-active: #0d6efd;
    --sidebar-active-text: #fff;
    --main-bg: #f5f6fa;
    --main-text: #222;
}
@media (prefers-color-scheme: dark) {
    :root {
        --sidebar-bg: #23272b;
        --sidebar-active: #0d6efd;
        --sidebar-active-text: #fff;
        --main-bg: #181a1b;
        --main-text: #e9ecef;
    }
}
body {
    background: var(--main-bg);
    color: var(--main-text);
}
body.text-center {
    display: flex;
    align-items: center;
    padding-top: 40px;
    padding-bottom: 40px;
    min-height: 100vh;
    background: linear-gradient(135deg, #6a82fb 0%, #fc5c7d 100%);
    position: relative;
}
body.text-center::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(34, 40, 49, 0.45);
    z-index: 0;
}
.form-signin {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 370px;
    padding: 40px 32px 32px 32px;
    margin: auto;
    background: rgba(255,255,255,0.92);
    border-radius: 1.1rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255,255,255,0.25);
}
@media (prefers-color-scheme: dark) {
    body.text-center {
        background: linear-gradient(135deg, #232526 0%, #414345 100%);
    }
    .form-signin {
        background: rgba(35,39,43,0.92);
        color: #e9ecef;
        box-shadow: 0 8px 32px rgba(0,0,0,0.28);
        border: 1px solid rgba(60,60,60,0.25);
    }
}
.form-signin .btn-primary {
    font-weight: 600;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 8px rgba(106,130,251,0.12);
    transition: background 0.2s, box-shadow 0.2s;
}
.form-signin .btn-primary:hover {
    background: #5a72e8;
    box-shadow: 0 4px 16px rgba(106,130,251,0.18);
}
.form-signin h1, .form-signin h2 {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.form-signin h1 {
    font-size: 2.1rem;
    margin-bottom: 0.5rem;
}
.form-signin h2 {
    font-size: 1.1rem;
    color: #888;
    font-weight: 400;
    margin-bottom: 1.5rem;
}
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .07);
    background: var(--sidebar-bg);
    min-width: 220px;
}
.sidebar .nav-link.active, .sidebar .nav-link:hover {
    background: var(--sidebar-active);
    color: var(--sidebar-active-text) !important;
    border-radius: 0.375rem;
}
.sidebar .nav-link {
    color: #555;
    margin: 0.2rem 0.5rem;
    transition: background 0.2s, color 0.2s;
}
.main-content {
    margin-left: 220px;
    padding: 32px 24px 24px 24px;
    background: var(--main-bg);
    min-height: 100vh;
}
.navbar {
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.card, .accordion, .table {
    border-radius: 0.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.table thead {
    background: var(--sidebar-bg);
}
.btn-primary, .btn-info, .btn-success, .btn-danger, .btn-warning {
    border-radius: 0.375rem;
}
.alert {
    border-radius: 0.375rem;
}

/* 主内容区背景恢复为浅灰色，与登录页区分 */
body.main-gradient-bg {
    background: linear-gradient(135deg, #6a82fb 0%, #fc5c7d 100%) !important;
    min-height: 100vh;
}

/* 侧边栏颜色增强，与主内容区区分 */
.sidebar {
    background: linear-gradient(135deg, #232526 0%, #414345 100%) !important; /* 深色渐变 */
    color: #fff;
    box-shadow: 2px 0 8px rgba(0,0,0,0.04);
    border-right: 1px solid #232526;
}

.sidebar .nav-link {
    color: #e9ecef;
}

.sidebar .nav-link.active {
    background: #6a82fb !important;
    color: #fff !important;
    border-radius: 0.5rem;
}

/* 主内容区保持浅灰色 */
.main-content {
    background: var(--main-bg, #f5f6fa) !important;
}

/* 内容卡片样式 */
.content-card {
    background: #fff;
    border-radius: 1.2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.13);
    padding: 2rem;
    margin-top: 1rem; /* 减小 margin-top，避免溢出 */
}

/* 按钮主色调、圆角，与登录页统一 */
.btn-primary {
    background: #6a82fb;
    border: none;
    border-radius: 0.5rem;
}
.btn-primary:hover {
    background: #5a72e8;
}

/* 表单控件圆角、浅色背景 */
.form-control {
    border-radius: 0.5rem;
    background: #f8f9fa;
}

/* 统一字体 */
body, .main-content, .content-card {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* 头部与侧边栏统一为纯蓝色 */
.navbar, .navbar-dark, .sidebar {
    background: #6a82fb !important;
    color: #fff !important;
    border-bottom: none;
    box-shadow: none;
}

/* 确保导航栏高度固定 */
.navbar {
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    overflow: visible !important;
    flex-wrap: nowrap;
}

.navbar .navbar-brand {
    height: 56px;
    display: flex;
    align-items: center;
}

/* 语言切换容器样式 */
.navbar-nav .nav-item.dropdown {
    position: relative;
}

.navbar .navbar-brand {
    color: #fff !important;
}

.sidebar .nav-link {
    color: #fff;
}

.sidebar .nav-link.active {
    background: rgba(255,255,255,0.18) !important;
    color: #fff !important;
    border-radius: 0.5rem;
} 

/* 表格表头主色调，提升一致性 */
.table thead th, .table thead td {
    background: #6a82fb;
    color: #fff;
    border-color: #6a82fb;
}

.table thead tr {
    border-radius: 0.5rem;
} 

/* Dashboard 统计数据模块专属样式 */
.dashboard-overview .card {
    background: #f0f4ff;
    border-radius: 1.2rem;
    box-shadow: 0 2px 8px rgba(106,130,251,0.10);
    border: 1px solid #e0e7ef;
    transition: box-shadow 0.2s;
}
.dashboard-overview .card:hover {
    box-shadow: 0 4px 16px rgba(106,130,251,0.16);
} 

/* Exchange 表单卡片风格，参考 permissions.html */
.exchange-form-card {
    border-radius: 1.2rem;
    box-shadow: 0 2px 8px rgba(106,130,251,0.10);
    border: 1px solid #e0e7ef;
    background: #fff;
    margin-bottom: 1.5rem;
}
.exchange-form-card .card-header {
    background: none;
    border-bottom: 1px solid #e0e7ef;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1rem 1.5rem 0.5rem 1.5rem;
}
.exchange-form-card .card-body {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
}

/* 语言切换按钮样式 */
#languageDropdown {
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    height: 40px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

#languageDropdown:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

#languageDropdown .dropdown-menu {
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border: none;
    margin-top: 0.5rem;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 160px;
    z-index: 1000;
    transform: none !important;
}

/* 确保下拉菜单不会影响页面布局 */
.dropdown-menu.show {
    position: absolute !important;
    transform: none !important;
}

/* 防止下拉菜单影响导航栏高度 */
.navbar-nav .dropdown {
    position: static;
}

.navbar-nav .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    margin-top: 0 !important;
    transform: none !important;
    width: auto !important;
    min-width: 160px;
}

/* 确保下拉菜单在正确的位置 */
.navbar-nav .nav-item.dropdown {
    position: relative;
}

/* 防止下拉菜单影响页面布局 */
.dropdown-menu {
    position: absolute !important;
    float: none !important;
    margin: 0 !important;
}

/* 确保导航栏内容垂直居中 */
.navbar-nav {
    align-items: center;
}

.navbar-nav .nav-item {
    display: flex;
    align-items: center;
}

#languageDropdown .dropdown-item {
    border-radius: 0.375rem;
    margin: 0.25rem;
    transition: all 0.2s ease;
}

#languageDropdown .dropdown-item:hover {
    background: #6a82fb;
    color: #fff;
    transform: translateX(2px);
}

/* 语言切换按钮中的国旗图标 */
#languageDropdown .dropdown-item span {
    font-size: 1.1em;
} 
